home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Games / othello / Source / Othello.h < prev    next >
Text File  |  1992-09-27  |  2KB  |  72 lines

  1. /* #define section -- set up the macros and definitions that make the code
  2.  *   marginally more readable.
  3.  */
  4.  
  5. #define EMPTY 0
  6. #define WHITE 1
  7. #define BLACK 2
  8. #define FIELD_WIDTH 8
  9. #define FIELD_HEIGHT 8
  10. #define NUM_SPACES (FIELD_WIDTH * FIELD_HEIGHT)
  11. #define cell(x, y) (x + (y * FIELD_WIDTH))
  12. #define x(num) (num % FIELD_WIDTH)
  13. #define y(num) (num / FIELD_HEIGHT)
  14.  
  15. /* Generated by Interface Builder */
  16.  
  17. #import <objc/Object.h>
  18. #import <appkit/Control.h>
  19. #import <appkit/Button.h>
  20. #import <appkit/Matrix.h>
  21. #import <appkit/TextField.h>
  22. #import <string.h>
  23. #import <stdlib.h>
  24. #import <streams/streams.h>
  25. #import <appkit/OpenPanel.h>
  26.  
  27.  
  28. @interface Othello:Object
  29. {
  30.     id    playField;
  31.     id    black_time;
  32.     id    white_time;
  33.     id    white_number;
  34.     id    black_number;
  35.     id  status;
  36.     id  savePanel;
  37.  
  38.     short theField[NUM_SPACES+1];
  39.     short theBckField[NUM_SPACES+1];
  40.     short theTurn;
  41. }
  42.  
  43. - saveGame:sender;
  44. - newGame:sender;
  45. - openGame:sender;
  46.  
  47. - undo:sender;
  48.  
  49. - swap;
  50. - backup;
  51.  
  52. - updateField:sender;
  53. - updatePlace:(int) theCell forPlayer:(int) thePlayer;
  54.  
  55. - (BOOL) checkDirection:(int) xDelta:(int) yDelta fromCell:(int)theCell
  56.              forPlayer:(int) thePlayer;
  57. - (void) doDirection:(int) xDelta:(int) yDelta fromCell:(int)theCell
  58.              forPlayer:(int) thePlayer;
  59. - (BOOL) allDirectionsFromCell:(int)theCell flipPieces:(BOOL) move;
  60. - (BOOL) allDirectionsFromCell:(int)theCell flipPieces:(BOOL) move
  61.  forPlayer:(int) thePlayer;
  62.  
  63. - (BOOL) canPlay:(int) thePlayer;
  64.  
  65. - moveMade:sender;
  66.  
  67. - (char *) playerToString:(int) thePlayer;
  68. - (char *) turnString;
  69.   
  70. - appDidInit:sender;
  71. @end
  72.